package com.wgts.wgts.dagger.module;

import com.wgts.wgts.dagger.scope.ActivityScope;
import com.wgts.wgts.mvp.model.ISearchResultFragmentModel;
import com.wgts.wgts.mvp.model.imp.SearchResultFragmentModel;
import com.wgts.wgts.mvp.presenter.IShopClassChildActivityPresenter;
import com.wgts.wgts.mvp.presenter.imp.ShopClassChildActivityPresenter;
import com.wgts.wgts.mvp.view.IShopClassChildActivityView;
import com.wgts.wgts.netmodle.NetService;

import dagger.Module;
import dagger.Provides;

/*
 *
 *
 *   data:2018/10/717:00
 *
 */
@Module
public class ShopClassChildActivityModule {
    private IShopClassChildActivityView view;

    public ShopClassChildActivityModule(IShopClassChildActivityView view) {
        this.view = view;
    }

    @ActivityScope
    @Provides
    public IShopClassChildActivityView provideView(){
        return view;
    }

    @ActivityScope
    @Provides
    public ISearchResultFragmentModel provideModel(NetService netService){
        return new SearchResultFragmentModel(netService);
    }

    @ActivityScope
    @Provides
    public IShopClassChildActivityPresenter providePresenter(IShopClassChildActivityView view, ISearchResultFragmentModel model){
        return new ShopClassChildActivityPresenter(view, model);
    }
}
